<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
<title></title>
</head>

<body>
<script type="text/javascript">
    function compare(n1,n2){
        var result="";
        if(n1>n2){
            result=n1+"大于"+n2;
        }else if(n1<n2){
            result=n1+"小于"+n2;
        }else{
            result=n1+"等于"+n2;
        }
        return result;
    }
    alert(compare(15,16));
</script>
</body>
</html>
